<html>
<head>
<title>Docs For Class QueryTemplatesSyntaxVars</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">QueryTemplates</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
        
                                    
                                                  		  [ <a href="../classtrees_QueryTemplates.html" class="menu">class tree: QueryTemplates</a> ]
		  [ <a href="../elementindex_QueryTemplates.html" class="menu">index: QueryTemplates</a> ]
		  	    [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_QueryTemplates.html">QueryTemplates</a><br />
              <a href="../li_phpQuery.html">phpQuery</a><br />
            <br /><br />
                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---IQueryTemplatesParse.php.html">		IQueryTemplatesParse.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---IQueryTemplatesTemplate.php.html">		IQueryTemplatesTemplate.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplates.php.html">		QueryTemplates.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesLanguage.php.html">		QueryTemplatesLanguage.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesLanguageJS.php.html">		QueryTemplatesLanguageJS.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesLanguagePHP.php.html">		QueryTemplatesLanguagePHP.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesParse.php.html">		QueryTemplatesParse.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSource.php.html">		QueryTemplatesSource.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSourceQuery.php.html">		QueryTemplatesSourceQuery.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSyntax.php.html">		QueryTemplatesSyntax.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSyntaxCode.php.html">		QueryTemplatesSyntaxCode.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSyntaxConditions.php.html">		QueryTemplatesSyntaxConditions.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSyntaxDOM.php.html">		QueryTemplatesSyntaxDOM.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSyntaxGenerators.php.html">		QueryTemplatesSyntaxGenerators.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSyntaxValues.php.html">		QueryTemplatesSyntaxValues.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSyntaxVars.php.html">		QueryTemplatesSyntaxVars.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesTemplate.php.html">		QueryTemplatesTemplate.php
		</a><br>
	  </div><br />
      
            <b>Interfaces:</b><br />
        <div class="package">
		    		<a href="../QueryTemplates/IQueryTemplatesParse.html">IQueryTemplatesParse</a><br />
	    		<a href="../QueryTemplates/IQueryTemplatesParseChain.html">IQueryTemplatesParseChain</a><br />
	    		<a href="../QueryTemplates/IQueryTemplatesTemplate.html">IQueryTemplatesTemplate</a><br />
	    		<a href="../QueryTemplates/IQueryTemplatesTemplateChain.html">IQueryTemplatesTemplateChain</a><br />
	    		<a href="../QueryTemplates/IQueryTemplatesTemplateParse.html">IQueryTemplatesTemplateParse</a><br />
	    		<a href="../QueryTemplates/IQueryTemplatesTemplateSources.html">IQueryTemplatesTemplateSources</a><br />
	  </div>
      
            <b>Classes:</b><br />
        <div class="package">
		    		<a href="../QueryTemplates/QueryTemplates.html">QueryTemplates</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesLanguage.html">QueryTemplatesLanguage</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesLanguageJS.html">QueryTemplatesLanguageJS</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesLanguagePHP.html">QueryTemplatesLanguagePHP</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSource.html">QueryTemplatesSource</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSourceQuery.html">QueryTemplatesSourceQuery</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSyntax.html">QueryTemplatesSyntax</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSyntaxCode.html">QueryTemplatesSyntaxCode</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html">QueryTemplatesSyntaxConditions</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSyntaxDOM.html">QueryTemplatesSyntaxDOM</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSyntaxGenerators.html">QueryTemplatesSyntaxGenerators</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSyntaxValues.html">QueryTemplatesSyntaxValues</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html">QueryTemplatesSyntaxVars</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesTemplate.html">QueryTemplatesTemplate</a><br />
	  </div>
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: QueryTemplatesSyntaxVars</h1>
Source Location: /home/bob/workspace/QueryTemplates/src/QueryTemplatesSyntaxVars.php<br /><br />


<table width="100%" border="0">
<tr><td valign="top">

<h3><a href="#class_details">Class Overview</a></h3>
<pre><a href="../phpQuery/phpQueryObject.html">phpQueryObject</a>
   |
   --<a href="../QueryTemplates/QueryTemplatesSyntaxDOM.html">QueryTemplatesSyntaxDOM</a>
      |
      --<a href="../QueryTemplates/QueryTemplatesSyntaxValues.html">QueryTemplatesSyntaxValues</a>
         |
         --<a href="../QueryTemplates/QueryTemplatesSyntaxCode.html">QueryTemplatesSyntaxCode</a>
            |
            --<a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html">QueryTemplatesSyntaxConditions</a>
               |
               --QueryTemplatesSyntaxVars</pre><br />
<div class="description">Class extending phpQueryObject with templating methods.</div><br /><br />
<h4>Author(s):</h4>
<ul>
          <li>Tobiasz Cudnik &lt;<a href="mailto:tobiasz.cudnik/gmail.com">tobiasz.cudnik/gmail.com</a>&gt;</li>
                        </ul>




                

        
</td>



<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodloop">loop</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodloopOne">loopOne</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodloopSeparate">loopSeparate</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelector">valuesToSelector</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorAfter">valuesToSelectorAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorAppend">valuesToSelectorAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorAttr">valuesToSelectorAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorBefore">valuesToSelectorBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorPrepend">valuesToSelectorPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorReplace">valuesToSelectorReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrint">varPrint</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintAfter">varPrintAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintAppend">varPrintAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintAttr">varPrintAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintBefore">varPrintBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintPrepend">varPrintPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintReplace">varPrintReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToForm">varsToForm</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToLoop">varsToLoop</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToLoopFirst">varsToLoopFirst</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToLoopSeparate">varsToLoopSeparate</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelector">varsToSelector</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorAfter">varsToSelectorAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorAppend">varsToSelectorAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorAttr">varsToSelectorAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorBefore">varsToSelectorBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorPrepend">varsToSelectorPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorReplace">varsToSelectorReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStack">varsToStack</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackAfter">varsToStackAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackAppend">varsToStackAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackAttr">varsToStackAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackBefore">varsToStackBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackPrepend">varsToStackPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackReplace">varsToStackReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#method_valuesToSelector">_valuesToSelector</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#method_varPrint">_varPrint</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#method_varsParseFields">_varsParseFields</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#method_varsToLoop">_varsToLoop</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#method_varsToSelector">_varsToSelector</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#method_varsToStack">_varsToStack</a></li>
  </ul>
</td>

</tr></table>
<hr />

<table width="100%" border="0"><tr>


<td valign="top">
<h3>Child classes:</h3>
<div class="tags">
<dl>
<dt><a href="../QueryTemplates/QueryTemplatesSyntaxGenerators.html">QueryTemplatesSyntaxGenerators</a></dt>
	<dd>Class extending phpQueryObject with templating methods.</dd>
</dl>
</div>
</td>


<td valign="top">
<h3>Inherited Variables</h3>
<div class="tags">
<h4>Class: <a href="../phpQuery/phpQueryObject.html">phpQueryObject</a></h4>
<dl>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$charset">phpQueryObject::$charset</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$current">phpQueryObject::$current</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$document">phpQueryObject::$document</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$documentFragment">phpQueryObject::$documentFragment</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$documentID">phpQueryObject::$documentID</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$documentWrapper">phpQueryObject::$documentWrapper</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$elements">phpQueryObject::$elements</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$elementsBackup">phpQueryObject::$elementsBackup</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$elementsInterator">phpQueryObject::$elementsInterator</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$previous">phpQueryObject::$previous</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$root">phpQueryObject::$root</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$valid">phpQueryObject::$valid</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$xpath">phpQueryObject::$xpath</a>
  </dt>
<dd>
   
</dd>
</dl>
</div>
</td>

<td valign="top">
<h3>Inherited Methods</h3>
<div class="tags">
<h4>Class: <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html">QueryTemplatesSyntaxConditions</a></h4>
<dl>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodelseIfCode">QueryTemplatesSyntaxConditions::elseIfCode()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodelseIfNotVar">QueryTemplatesSyntaxConditions::elseIfNotVar()</a>
  </dt>
  <dd>
    Wraps selected tag with PHP &quot;else if&quot; statement checking if $var evaluates  to FALSE. $var must be available inside template's scope.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodelseIfPHP">QueryTemplatesSyntaxConditions::elseIfPHP()</a>
  </dt>
  <dd>
    Wraps selected tag with PHP &quot;else if&quot; statement containing $code as condition.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodelseIfVar">QueryTemplatesSyntaxConditions::elseIfVar()</a>
  </dt>
  <dd>
    Wraps selected tag with PHP &quot;else if&quot; statement checking if $var evaluates  to true. $var must be available inside template's scope.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodelsePHP">QueryTemplatesSyntaxConditions::elsePHP()</a>
  </dt>
  <dd>
    Wraps selected tag with PHP &quot;else&quot; statement.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodelseStatement">QueryTemplatesSyntaxConditions::elseStatement()</a>
  </dt>
  <dd>
    TODO description
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodendOnly">QueryTemplatesSyntaxConditions::endOnly()</a>
  </dt>
  <dd>
    TODO docs
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodifCode">QueryTemplatesSyntaxConditions::ifCode()</a>
  </dt>
  <dd>
    TODO doc
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodifNotVar">QueryTemplatesSyntaxConditions::ifNotVar()</a>
  </dt>
  <dd>
    Wraps selected tag with PHP &quot;if&quot; statement checking if $var evaluates  to FALSE. $var must be available inside template's scope.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodifPHP">QueryTemplatesSyntaxConditions::ifPHP()</a>
  </dt>
  <dd>
    Wraps selected tag with PHP &quot;if&quot; statement containing $code as condition.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodifVar">QueryTemplatesSyntaxConditions::ifVar()</a>
  </dt>
  <dd>
    Wraps selected tag with PHP &quot;if&quot; statement checking if $var evaluates  to TRUE. $var must be available inside template's scope.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodonlyIf">QueryTemplatesSyntaxConditions::onlyIf()</a>
  </dt>
  <dd>
    TODO docs
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodonlyIfNot">QueryTemplatesSyntaxConditions::onlyIfNot()</a>
  </dt>
  <dd>
    TODO docs
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodonlyJS">QueryTemplatesSyntaxConditions::onlyJS()</a>
  </dt>
  <dd>
    TODO Move to jsCode plugin.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodonlyPHP">QueryTemplatesSyntaxConditions::onlyPHP()</a>
  </dt>
  <dd>
    Honors code between onlyPHP and endOnly, only for PHP templates.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodtagToElseIfNotVar">QueryTemplatesSyntaxConditions::tagToElseIfNotVar()</a>
  </dt>
  <dd>
    Replaces selected tag with PHP &quot;else if&quot; statement checking if $var evaluates  to FALSE. $var must be available inside template's scope.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodtagToElseIfPHP">QueryTemplatesSyntaxConditions::tagToElseIfPHP()</a>
  </dt>
  <dd>
    Replaces selected tag with PHP &quot;else if&quot; statement containing $code as condition.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodtagToElseIfVar">QueryTemplatesSyntaxConditions::tagToElseIfVar()</a>
  </dt>
  <dd>
    Replaces selected tag with PHP &quot;else if&quot; statement checking if $var evaluates  to TRUE. $var must be available inside template's scope.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodtagToElsePHP">QueryTemplatesSyntaxConditions::tagToElsePHP()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodtagToElseStatement">QueryTemplatesSyntaxConditions::tagToElseStatement()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodtagToIfNotVar">QueryTemplatesSyntaxConditions::tagToIfNotVar()</a>
  </dt>
  <dd>
    Replaces selected tag with PHP &quot;if&quot; statement checking if $var evaluates  to FALSE. $var must be available inside template's scope.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodtagToIfPHP">QueryTemplatesSyntaxConditions::tagToIfPHP()</a>
  </dt>
  <dd>
    Replaces selected tag with PHP &quot;if&quot; statement containing $code as condition.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#methodtagToIfVar">QueryTemplatesSyntaxConditions::tagToIfVar()</a>
  </dt>
  <dd>
    Replaces selected tag with PHP &quot;if&quot; statement checking if $var evaluates  to TRUE. $var must be available inside template's scope.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#method_if">QueryTemplatesSyntaxConditions::_if()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxConditions.html#method_tagToElse">QueryTemplatesSyntaxConditions::_tagToElse()</a>
  </dt>
  <dd>
    
  </dd>
  </dl>
<h4>Class: <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html">QueryTemplatesSyntaxCode</a></h4>
<dl>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToSelector">QueryTemplatesSyntaxCode::codeToSelector()</a>
  </dt>
  <dd>
    Injects raw executable code inside nodes matched by selector. Method uses  actually matched nodes as root for the query.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToSelectorAfter">QueryTemplatesSyntaxCode::codeToSelectorAfter()</a>
  </dt>
  <dd>
    Injects raw executable code after nodes matched by selector. Method uses  actually matched nodes as root for the query.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToSelectorAppend">QueryTemplatesSyntaxCode::codeToSelectorAppend()</a>
  </dt>
  <dd>
    Injects raw executable code at the end of nodes matched by selector. Method  uses actually matched nodes as root for the query.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToSelectorAttr">QueryTemplatesSyntaxCode::codeToSelectorAttr()</a>
  </dt>
  <dd>
    Injects raw executable code inside attribute of nodes matched by selector.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToSelectorBefore">QueryTemplatesSyntaxCode::codeToSelectorBefore()</a>
  </dt>
  <dd>
    Injects raw executable code before nodes matched by selector. Method uses  actually matched nodes as root for the query.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToSelectorPrepend">QueryTemplatesSyntaxCode::codeToSelectorPrepend()</a>
  </dt>
  <dd>
    Injects raw executable code at the beggining of nodes matched by selector.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToSelectorReplace">QueryTemplatesSyntaxCode::codeToSelectorReplace()</a>
  </dt>
  <dd>
    Injects raw executable code replacing nodes matched by selector. Method uses  actually matched nodes as root for the query.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToStack">QueryTemplatesSyntaxCode::codeToStack()</a>
  </dt>
  <dd>
    Injects raw executable code inside actually matched nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToStackAfter">QueryTemplatesSyntaxCode::codeToStackAfter()</a>
  </dt>
  <dd>
    Injects raw executable code after actually matched nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToStackAppend">QueryTemplatesSyntaxCode::codeToStackAppend()</a>
  </dt>
  <dd>
    Injects raw executable code at the beggining of actually matched nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToStackAttr">QueryTemplatesSyntaxCode::codeToStackAttr()</a>
  </dt>
  <dd>
    Injects raw executable code inside attribute of actually matched nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToStackBefore">QueryTemplatesSyntaxCode::codeToStackBefore()</a>
  </dt>
  <dd>
    Injects raw executable code before actually matched nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToStackPrepend">QueryTemplatesSyntaxCode::codeToStackPrepend()</a>
  </dt>
  <dd>
    Injects raw executable code at the end of actually matched nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#methodcodeToStackReplace">QueryTemplatesSyntaxCode::codeToStackReplace()</a>
  </dt>
  <dd>
    Injects raw executable code replacing actually matched nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#method_codeToSelector">QueryTemplatesSyntaxCode::_codeToSelector()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxCode.html#method_codeToStack">QueryTemplatesSyntaxCode::_codeToStack()</a>
  </dt>
  <dd>
    
  </dd>
  </dl>
<h4>Class: <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html">QueryTemplatesSyntaxValues</a></h4>
<dl>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToForm">QueryTemplatesSyntaxValues::valuesToForm()</a>
  </dt>
  <dd>
    Toggles form fields values and selection states according to static values  from $values.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToLoop">QueryTemplatesSyntaxValues::valuesToLoop()</a>
  </dt>
  <dd>
    Method loops provided $values on actually selected nodes. Each time new row  is inserted, provided callback is triggered with $dataRow, $node and $dataIndex.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToLoopBefore">QueryTemplatesSyntaxValues::valuesToLoopBefore()</a>
  </dt>
  <dd>
    Method loops provided $values on actually selected nodes. Each time new row  is inserted, provided callback is triggered with $dataRow, $node and $dataIndex.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToLoopFirst">QueryTemplatesSyntaxValues::valuesToLoopFirst()</a>
  </dt>
  <dd>
    Method loops provided $values on actually selected nodes. Each time new row  is inserted, provided callback is triggered with $dataRow, $node and $dataIndex.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToLoopSeparate">QueryTemplatesSyntaxValues::valuesToLoopSeparate()</a>
  </dt>
  <dd>
    Method loops provided $values on actually selected nodes. Each time new row  is inserted, provided callback is triggered with $dataRow, $node and $dataIndex.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToStack">QueryTemplatesSyntaxValues::valuesToStack()</a>
  </dt>
  <dd>
    Injects markup from $values' content (rows or attributes) inside actually  selected nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToStackAfter">QueryTemplatesSyntaxValues::valuesToStackAfter()</a>
  </dt>
  <dd>
    Injects markup from $values' content (rows or attributes) inside actually  selected nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToStackAppend">QueryTemplatesSyntaxValues::valuesToStackAppend()</a>
  </dt>
  <dd>
    Injects markup from $values' content (rows or attributes) inside actually  selected nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToStackAttr">QueryTemplatesSyntaxValues::valuesToStackAttr()</a>
  </dt>
  <dd>
    Injects markup from $values' content (rows or attributes) inside actually  selected nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToStackBefore">QueryTemplatesSyntaxValues::valuesToStackBefore()</a>
  </dt>
  <dd>
    Injects markup from $values' content (rows or attributes) inside actually  selected nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToStackPrepend">QueryTemplatesSyntaxValues::valuesToStackPrepend()</a>
  </dt>
  <dd>
    Injects markup from $values' content (rows or attributes) inside actually  selected nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#methodvaluesToStackReplace">QueryTemplatesSyntaxValues::valuesToStackReplace()</a>
  </dt>
  <dd>
    Injects markup from $values' content (rows or attributes) inside actually  selected nodes.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#method_valuesToLoop">QueryTemplatesSyntaxValues::_valuesToLoop()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxValues.html#method_valuesToStack">QueryTemplatesSyntaxValues::_valuesToStack()</a>
  </dt>
  <dd>
    
  </dd>
  </dl>
<h4>Class: <a href="../QueryTemplates/QueryTemplatesSyntaxDOM.html">QueryTemplatesSyntaxDOM</a></h4>
<dl>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxDOM.html#methodattrAppend">QueryTemplatesSyntaxDOM::attrAppend()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxDOM.html#methodattrPrepend">QueryTemplatesSyntaxDOM::attrPrepend()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxDOM.html#methodstackToMethod">QueryTemplatesSyntaxDOM::stackToMethod()</a>
  </dt>
  <dd>
    Returns array being result of running $method on all stack elements.
  </dd>
    <dt>
    <a href="../QueryTemplates/QueryTemplatesSyntaxDOM.html#methodunWrap">QueryTemplatesSyntaxDOM::unWrap()</a>
  </dt>
  <dd>
    Removes selected element and moves it's children into parent node.
  </dd>
  </dl>
<h4>Class: <a href="../phpQuery/phpQueryObject.html">phpQueryObject</a></h4>
<dl>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__construct">phpQueryObject::__construct()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodadd">phpQueryObject::add()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodaddClass">phpQueryObject::addClass()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodaddClassPHP">phpQueryObject::addClassPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodafter">phpQueryObject::after()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodafterPHP">phpQueryObject::afterPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodancestors">phpQueryObject::ancestors()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodandSelf">phpQueryObject::andSelf()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodappend">phpQueryObject::append()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodappendPHP">phpQueryObject::appendPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodappendTo">phpQueryObject::appendTo()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodattr">phpQueryObject::attr()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodattrEvents">phpQueryObject::attrEvents()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodattrPHP">phpQueryObject::attrPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodbefore">phpQueryObject::before()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodbeforePHP">phpQueryObject::beforePHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodbind">phpQueryObject::bind()</a>
  </dt>
  <dd>
    Binds a handler to one or more events (like click) for each matched element.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcallback">phpQueryObject::callback()</a>
  </dt>
  <dd>
    Run callback on actual object.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodchange">phpQueryObject::change()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodchildren">phpQueryObject::children()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodclick">phpQueryObject::click()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcontents">phpQueryObject::contents()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcontentsUnwrap">phpQueryObject::contentsUnwrap()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcount">phpQueryObject::count()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcss">phpQueryObject::css()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcurrent">phpQueryObject::current()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddebug">phpQueryObject::debug()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddocumentFragment">phpQueryObject::documentFragment()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddump">phpQueryObject::dump()</a>
  </dt>
  <dd>
    Dump htmlOuter and preserve chain. Usefull for debugging.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddumpDie">phpQueryObject::dumpDie()</a>
  </dt>
  <dd>
    Dump htmlOuter and stop script execution. Usefull for debugging.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddumpLength">phpQueryObject::dumpLength()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddumpTree">phpQueryObject::dumpTree()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddumpWhois">phpQueryObject::dumpWhois()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodeach">phpQueryObject::each()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodelementsContainsNode">phpQueryObject::elementsContainsNode()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodend">phpQueryObject::end()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodeq">phpQueryObject::eq()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodextend">phpQueryObject::extend()</a>
  </dt>
  <dd>
    Deprecated, use $pq-&gt;plugin() instead.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodfilter">phpQueryObject::filter()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodfilterCallback">phpQueryObject::filterCallback()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodfind">phpQueryObject::find()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodget">phpQueryObject::get()</a>
  </dt>
  <dd>
    Return matched DOM nodes.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetDocument">phpQueryObject::getDocument()</a>
  </dt>
  <dd>
    Returns object with stack set to document root.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetDocumentID">phpQueryObject::getDocumentID()</a>
  </dt>
  <dd>
    Get object's Document ID.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetDocumentIDRef">phpQueryObject::getDocumentIDRef()</a>
  </dt>
  <dd>
    Saves object's DocumentID to $var by reference.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetDOMDocument">phpQueryObject::getDOMDocument()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetElementSiblings">phpQueryObject::getElementSiblings()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetNodeAttrs">phpQueryObject::getNodeAttrs()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetNodeXpath">phpQueryObject::getNodeXpath()</a>
  </dt>
  <dd>
    Returns node's XPath.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetString">phpQueryObject::getString()</a>
  </dt>
  <dd>
    Return matched DOM nodes.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetStrings">phpQueryObject::getStrings()</a>
  </dt>
  <dd>
    Return matched DOM nodes.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodhasClass">phpQueryObject::hasClass()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodhide">phpQueryObject::hide()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodhtml">phpQueryObject::html()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodhtmlOuter">phpQueryObject::htmlOuter()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodindex">phpQueryObject::index()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodinsert">phpQueryObject::insert()</a>
  </dt>
  <dd>
    Internal insert method. Don't use it.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodinsertAfter">phpQueryObject::insertAfter()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodinsertBefore">phpQueryObject::insertBefore()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodis">phpQueryObject::is()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisChar">phpQueryObject::isChar()</a>
  </dt>
  <dd>
    Determines if $char is really a char.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisHTML">phpQueryObject::isHTML()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisRegexp">phpQueryObject::isRegexp()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisRoot">phpQueryObject::isRoot()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisXHTML">phpQueryObject::isXHTML()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisXML">phpQueryObject::isXML()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodkey">phpQueryObject::key()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodlength">phpQueryObject::length()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodload">phpQueryObject::load()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmap">phpQueryObject::map()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmarkup">phpQueryObject::markup()</a>
  </dt>
  <dd>
    jQuey difference
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmarkupEvents">phpQueryObject::markupEvents()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmarkupOuter">phpQueryObject::markupOuter()</a>
  </dt>
  <dd>
    jQuey difference
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmarkupOuterPHP">phpQueryObject::markupOuterPHP()</a>
  </dt>
  <dd>
    TODO doc
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmarkupPHP">phpQueryObject::markupPHP()</a>
  </dt>
  <dd>
    TODO doc
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmatchClasses">phpQueryObject::matchClasses()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmerge">phpQueryObject::merge()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodnewInstance">phpQueryObject::newInstance()</a>
  </dt>
  <dd>
    Returns new instance of actual class.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodnext">phpQueryObject::next()</a>
  </dt>
  <dd>
    Double-function method.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodnextAll">phpQueryObject::nextAll()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodnot">phpQueryObject::not()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodoffsetExists">phpQueryObject::offsetExists()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodoffsetGet">phpQueryObject::offsetGet()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodoffsetSet">phpQueryObject::offsetSet()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodoffsetUnset">phpQueryObject::offsetUnset()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodparent">phpQueryObject::parent()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodparents">phpQueryObject::parents()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodparseSelector">phpQueryObject::parseSelector()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodphp">phpQueryObject::php()</a>
  </dt>
  <dd>
    Just like html(), but returns markup with VALID (dangerous) PHP tags.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodplugin">phpQueryObject::plugin()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodprepend">phpQueryObject::prepend()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodprependPHP">phpQueryObject::prependPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodprependTo">phpQueryObject::prependTo()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodprev">phpQueryObject::prev()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodprevAll">phpQueryObject::prevAll()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodpseudoClasses">phpQueryObject::pseudoClasses()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodremove">phpQueryObject::remove()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodremoveAttr">phpQueryObject::removeAttr()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodremoveClass">phpQueryObject::removeClass()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodreplaceAll">phpQueryObject::replaceAll()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodreplaceWith">phpQueryObject::replaceWith()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodreplaceWithPHP">phpQueryObject::replaceWithPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodreverse">phpQueryObject::reverse()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodrewind">phpQueryObject::rewind()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodrunQuery">phpQueryObject::runQuery()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodserialize">phpQueryObject::serialize()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodserializeArray">phpQueryObject::serializeArray()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodshow">phpQueryObject::show()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodsiblings">phpQueryObject::siblings()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodsize">phpQueryObject::size()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodslice">phpQueryObject::slice()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodstack">phpQueryObject::stack()</a>
  </dt>
  <dd>
    Internal stack iterator.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodstackIsRoot">phpQueryObject::stackIsRoot()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodsubmit">phpQueryObject::submit()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodswitchWith">phpQueryObject::switchWith()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtext">phpQueryObject::text()</a>
  </dt>
  <dd>
    Return joined text content.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtoggleClass">phpQueryObject::toggleClass()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtoReference">phpQueryObject::toReference()</a>
  </dt>
  <dd>
    Saves actual object to $var by reference.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtoRoot">phpQueryObject::toRoot()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtrigger">phpQueryObject::trigger()</a>
  </dt>
  <dd>
    Trigger a type of event on every matched element.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtriggerHandler">phpQueryObject::triggerHandler()</a>
  </dt>
  <dd>
    This particular method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browsers default actions.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodunbind">phpQueryObject::unbind()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodunloadDocument">phpQueryObject::unloadDocument()</a>
  </dt>
  <dd>
    Unloads whole document from memory.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodunQuote">phpQueryObject::unQuote()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodval">phpQueryObject::val()</a>
  </dt>
  <dd>
    Return form element value.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodvalid">phpQueryObject::valid()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwhois">phpQueryObject::whois()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrap">phpQueryObject::wrap()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapAll">phpQueryObject::wrapAll()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapAllOld">phpQueryObject::wrapAllOld()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapAllPHP">phpQueryObject::wrapAllPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapInner">phpQueryObject::wrapInner()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapInnerPHP">phpQueryObject::wrapInnerPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapPHP">phpQueryObject::wrapPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodxml">phpQueryObject::xml()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodxmlOuter">phpQueryObject::xmlOuter()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method_clone">phpQueryObject::_clone()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method_empty">phpQueryObject::_empty()</a>
  </dt>
  <dd>
    Proper name without underscore (just -&gt;empty()) also works.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method_next">phpQueryObject::_next()</a>
  </dt>
  <dd>
    Safe rename of next().
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method_prev">phpQueryObject::_prev()</a>
  </dt>
  <dd>
    Use prev() and next().
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__call">phpQueryObject::__call()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__get">phpQueryObject::__get()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__loadSuccess">phpQueryObject::__loadSuccess()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__pseudoClassParam">phpQueryObject::__pseudoClassParam()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__toString">phpQueryObject::__toString()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method___wrapAllCallback">phpQueryObject::___wrapAllCallback()</a>
  </dt>
  <dd>
    
  </dd>
  </dl>
</div>
</td>

</tr></table>
<hr />

<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line 11]<br />
Class extending phpQueryObject with templating methods.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Tobiasz Cudnik &lt;<a href="mailto:tobiasz.cudnik/gmail.com">tobiasz.cudnik/gmail.com</a>&gt;</td>
  </tr>
  <tr>
    <td><b>link:</b>&nbsp;&nbsp;</td><td><a href="http://code.google.com/p/querytemplates/">http://code.google.com/p/querytemplates/</a></td>
  </tr>
  <tr>
    <td><b>abstract:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>license:</b>&nbsp;&nbsp;</td><td><a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a></td>
  </tr>
</table>
</div>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />


<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">

  <hr />
	<a name="methodloop"></a>
	<h3>method loop <span class="smalllinenumber">[line 2546]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>unknown_type loop(
$varName
$varName, $asVarName
$asVarName, [$keyName
$keyName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>deprecated:</b>&nbsp;&nbsp;</td><td>use varsToLoop</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$varName&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$asVarName&nbsp;&nbsp;</td>
        <td><b>$asVarName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$keyName&nbsp;&nbsp;</td>
        <td><b>$keyName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodloopOne"></a>
	<h3>method loopOne <span class="smalllinenumber">[line 2536]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>unknown_type loopOne(
$varName
$varName, $asVarName
$asVarName, [$keyName
$keyName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>deprecated:</b>&nbsp;&nbsp;</td><td>use varsToLoopFirst</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$varName&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$asVarName&nbsp;&nbsp;</td>
        <td><b>$asVarName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$keyName&nbsp;&nbsp;</td>
        <td><b>$keyName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodloopSeparate"></a>
	<h3>method loopSeparate <span class="smalllinenumber">[line 2526]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>unknown_type loopSeparate(
$varName
$varName, $asVarName
$asVarName, [$keyName
$keyName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>deprecated:</b>&nbsp;&nbsp;</td><td>use varsToLoopSeparate</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$varName&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$asVarName&nbsp;&nbsp;</td>
        <td><b>$asVarName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$keyName&nbsp;&nbsp;</td>
        <td><b>$keyName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelector"></a>
	<h3>method valuesToSelector <span class="smalllinenumber">[line 1821]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelector(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) into nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelector">valuesToSelector</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;</span>&gt;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;</span>&gt;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorAfter"></a>
	<h3>method valuesToSelectorAfter <span class="smalllinenumber">[line 2065]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorAfter(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) after nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorAfter">valuesToSelectorAfter</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorAppend"></a>
	<h3>method valuesToSelectorAppend <span class="smalllinenumber">[line 2229]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorAppend(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) at the end of  nodes matched by selector. Method uses actually matched nodes as root  for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorAppend">valuesToSelectorAppend</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorAttr"></a>
	<h3>method valuesToSelectorAttr <span class="smalllinenumber">[line 2312]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorAttr(
String
$attr, Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) as attribute of  nodes matched by selector. Method uses actually matched nodes as root  for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorAttr">valuesToSelectorAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;&nbsp;</span><span class="src-id">rel</span>=<span class="src-str">&quot;&amp;lt;foo/&amp;gt;&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;&nbsp;</span><span class="src-id">rel</span>=<span class="src-str">&quot;&amp;lt;bar/&amp;gt;&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorBefore"></a>
	<h3>method valuesToSelectorBefore <span class="smalllinenumber">[line 1981]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorBefore(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) before nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorBefore">valuesToSelectorBefore</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">bar</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorPrepend"></a>
	<h3>method valuesToSelectorPrepend <span class="smalllinenumber">[line 2147]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorPrepend(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) at the beggining of  nodes matched by selector. Method uses actually matched nodes as root  for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorPrepend">valuesToSelectorPrepend</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;</span>&gt;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;</span>&gt;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">bar</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorReplace"></a>
	<h3>method valuesToSelectorReplace <span class="smalllinenumber">[line 1899]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorReplace(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) replacing nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvaluesToSelectorReplace">valuesToSelectorReplace</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrint"></a>
	<h3>method varPrint <span class="smalllinenumber">[line 68]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrint(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName as matched elements' content.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrint">varPrint</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintAfter"></a>
	<h3>method varPrintAfter <span class="smalllinenumber">[line 247]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintAfter(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName after matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintAfter">varPrintAfter</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;FOO&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintAppend"></a>
	<h3>method varPrintAppend <span class="smalllinenumber">[line 367]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintAppend(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName on the end of matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintAppend">varPrintAppend</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;FOO<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintAttr"></a>
	<h3>method varPrintAttr <span class="smalllinenumber">[line 449]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintAttr(
String
$attr, String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName as attribute $attr of matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintAttr">varPrintAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&nbsp;data.foo.bar.0=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;FOO&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintBefore"></a>
	<h3>method varPrintBefore <span class="smalllinenumber">[line 186]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintBefore(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName before matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintBefore">varPrintBefore</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;p&gt;FOO&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintPrepend"></a>
	<h3>method varPrintPrepend <span class="smalllinenumber">[line 307]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintPrepend(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName on beggining of matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintPrepend">varPrintPrepend</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>FOO&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintReplace"></a>
	<h3>method varPrintReplace <span class="smalllinenumber">[line 126]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintReplace(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName replacing matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarPrintReplace">varPrintReplace</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToForm"></a>
	<h3>method varsToForm <span class="smalllinenumber">[line 2670]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|QueryTemplatesPhpQuery varsToForm(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = &quot;[name*='%k']&quot;])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code which toggles form fields values and selection  states according to value of variable $varName.<br /><br /><p>This includes: <ul><li>`input[type=radio][checked]`</li><li>`input[type=checkbox][checked]`</li><li>`select &gt; option[selected]`</li><li>`input[value]`</li><li>`textarea`</li></ul>  Inputs are selected according to $selectorPattern, where %k represents  variable's key.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">form</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;name</span>=<span class="src-str">'input-example'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;name</span>=<span class="src-str">'array[array-example]'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">textarea&nbsp;name</span>=<span class="src-str">'textarea-example'</span>&gt;&lt;/<span class="src-id">textarea</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">select&nbsp;name</span>=<span class="src-str">'select-example'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">option&nbsp;value</span>=<span class="src-str">'first'&nbsp;</span><span class="src-id">selected</span>=<span class="src-str">'selected'</span>&gt;&lt;/<span class="src-id">option</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">select</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'radio'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'radio-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'foo'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'checkbox'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'checkbox-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'foo'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">form</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'input-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'array-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'textarea-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'select-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'radio-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'checkbox-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToForm">varsToForm</a><span class="src-sym">(</span><span class="src-str">'data'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$data</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;form&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;input&nbsp;name=&quot;input-example&quot;&nbsp;value=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'input-example'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'input-example'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'input-example'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'input-example'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;&lt;input&nbsp;name=&quot;array[array-example]&quot;&nbsp;value=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'array-example'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'array-example'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'array-example'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'array-example'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;&lt;textarea&nbsp;name=&quot;textarea-example&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'textarea-example'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'textarea-example'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'textarea-example'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'textarea-example'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/textarea&gt;&lt;select&nbsp;name=&quot;select-example&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'select-example'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'select-example'</span><span class="src-sym">]&nbsp;</span>==&nbsp;<span class="src-str">'first'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'select-example'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'select-example'</span><span class="src-sym">}&nbsp;</span>==&nbsp;<span class="src-str">'first'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;option&nbsp;value=&quot;first&quot;&nbsp;selected&gt;&lt;/option&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;option&nbsp;value=&quot;first&quot;&gt;&lt;/option&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/select&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'radio-example'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'radio-example'</span><span class="src-sym">]&nbsp;</span>==&nbsp;<span class="src-str">'foo'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'radio-example'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'radio-example'</span><span class="src-sym">}&nbsp;</span>==&nbsp;<span class="src-str">'foo'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;input&nbsp;type=&quot;radio&quot;&nbsp;name=&quot;radio-example&quot;&nbsp;value=&quot;foo&quot;&nbsp;checked&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;input&nbsp;type=&quot;radio&quot;&nbsp;name=&quot;radio-example&quot;&nbsp;value=&quot;foo&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'checkbox-example'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'checkbox-example'</span><span class="src-sym">]&nbsp;</span>==&nbsp;<span class="src-str">'foo'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'checkbox-example'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'checkbox-example'</span><span class="src-sym">}&nbsp;</span>==&nbsp;<span class="src-str">'foo'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;input&nbsp;type=&quot;checkbox&quot;&nbsp;name=&quot;checkbox-example&quot;&nbsp;value=&quot;foo&quot;&nbsp;checked&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;input&nbsp;type=&quot;checkbox&quot;&nbsp;name=&quot;checkbox-example&quot;&nbsp;value=&quot;foo&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;/form&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">form</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;input-example&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;array[array-example]&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">textarea</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;textarea-example&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">select</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;select-example&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">option</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;first&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">selected</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;radio-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;checkbox-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">form</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;input-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-id">PHP</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;array[array-example]&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-id">PHP</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">textarea</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;textarea-example&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">select</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;select-example&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">option</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;first&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">selected</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">option</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;first&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;radio-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">checked</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;radio-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;checkbox-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">checked</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;checkbox-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToForm()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::formFromVars()</td>
  </tr>
  <tr>
    <td><b>TODO:</b>&nbsp;&nbsp;</td><td>support select[multiple] (thou array)</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching form fields.  Defaults to &quot;[name*='%k']&quot;, which matches fields containing variable's key in  their names. For example, to match only names starting with &quot;foo[bar]&quot; change  $selectorPattern to &quot;[name^='foo[bar]'][name*='%k']&quot;</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToLoop"></a>
	<h3>method varsToLoop <span class="smalllinenumber">[line 2461]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToLoop(
String
$varName, String
$rowName, [String
$indexName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected elements with executable code iterating $varName as $rowName.<br /><br /><p>Method doesn't change selected nodes stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">ul</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'row'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'name'</span>&gt;&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">ul&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'tags'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'tag'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'name'</span>&gt;&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">ul</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">ul</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'User'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'Tags'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'php'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'js'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'User'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'bar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'Tags'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'perl'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'User'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'fooBar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'Tags'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'php'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'js'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'perl'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$userFields&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$tagFields&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../phpQuery/phpQueryObject.html#methodfind">find</a><span class="src-sym">(</span><span class="src-str">'&gt;&nbsp;ul&nbsp;&gt;&nbsp;li'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToLoop">varsToLoop</a><span class="src-sym">(</span><span class="src-str">'data'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'row'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelector">varsToSelector</a><span class="src-sym">(</span><span class="src-str">'row'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$userFields</span><span class="src-sym">,&nbsp;</span><span class="src-str">'span.%k'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../phpQuery/phpQueryObject.html#methodfind">find</a><span class="src-sym">(</span><span class="src-str">'&gt;&nbsp;ul&nbsp;&gt;&nbsp;li'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToLoop">varsToLoop</a><span class="src-sym">(</span><span class="src-str">'row.Tags'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'tag'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelector">varsToSelector</a><span class="src-sym">(</span><span class="src-str">'tag'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$tagFields</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;ul&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)&nbsp;</span>||&nbsp;<a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)))&nbsp;</span><span class="src-sym">{&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$data&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$row</span><span class="src-sym">)</span>:&nbsp;&nbsp;<span class="src-php">?&gt;</span>&lt;li&nbsp;class=&quot;row&quot;&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span&nbsp;class=&quot;name&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'name'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$row</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'name'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/span&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul&nbsp;class=&quot;tags&quot;&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">'Tags'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-var">$__8daca&nbsp;</span>=&nbsp;<span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">'Tags'</span><span class="src-sym">]</span><span class="src-sym">;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'Tags'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span><span class="src-var">$__8daca&nbsp;</span>=&nbsp;<span class="src-var">$row</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'Tags'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$__8daca</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$__8daca</span><span class="src-sym">)&nbsp;</span>||&nbsp;<a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(</span><span class="src-var">$__8daca</span><span class="src-sym">)))&nbsp;</span><span class="src-sym">{&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$__8daca&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$tag</span><span class="src-sym">)</span>:&nbsp;&nbsp;<span class="src-php">?&gt;</span>&lt;li&nbsp;class=&quot;tag&quot;&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span&nbsp;class=&quot;name&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$tag</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$tag</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$tag</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'name'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$tag</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'name'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/span&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">endforeach</span><span class="src-sym">;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/li&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">endforeach</span><span class="src-sym">;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;/ul&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">ul</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">row</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">ul</span>.<span class="src-id">tags</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">ul</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">row</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">ul</span>.<span class="src-id">tags</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::valuesToLoop()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable which will be looped. Must contain $ at the beggining.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$rowName</b>&nbsp;&nbsp;</td>
        <td>Name of variable being result of iteration.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$indexName</b>&nbsp;&nbsp;</td>
        <td>Optional. Use it when you want to have $varName's key available in the scope.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToLoopFirst"></a>
	<h3>method varsToLoopFirst <span class="smalllinenumber">[line 2513]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToLoopFirst(
String
$varName, String
$rowName, [String
$indexName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected elements with executable code iterating $varName as $rowName.<br /><br /><p>Acts as varsToLoop(), but loops only first node from stack. Rest is removed  from the DOM.</p><p>Method DOES change selected nodes stack. Returned is first node.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToLoop()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable which will be looped. Must contain $ at the beggining.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$rowName</b>&nbsp;&nbsp;</td>
        <td>Name of variable being result of iteration.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$indexName</b>&nbsp;&nbsp;</td>
        <td>Optional. Use it when you want to have $varName's key available in the scope.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToLoopSeparate"></a>
	<h3>method varsToLoopSeparate <span class="smalllinenumber">[line 2483]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToLoopSeparate(
String
$varName, String
$rowName, [String
$indexName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected elements with executable code iterating $varName as $rowName.<br /><br /><p>Acts as varsToLoop(), but affects each selected element separately.</p><p>Method doesn't change selected nodes stack.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToLoop()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable which will be looped. Must contain $ at the beggining.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$rowName</b>&nbsp;&nbsp;</td>
        <td>Name of variable being result of iteration.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$indexName</b>&nbsp;&nbsp;</td>
        <td>Optional. Use it when you want to have $varName's key available in the scope.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelector"></a>
	<h3>method varsToSelector <span class="smalllinenumber">[line 533]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelector(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields inside nodes matched by  selector. Method uses actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelector">varsToSelector</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorAfter"></a>
	<h3>method varsToSelectorAfter <span class="smalllinenumber">[line 877]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorAfter(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields after nodes matched by  selector. Method uses actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorAfter">varsToSelectorAfter</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorAppend"></a>
	<h3>method varsToSelectorAppend <span class="smalllinenumber">[line 702]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorAppend(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields at the end of nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorAppend">varsToSelectorAppend</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;lorem&nbsp;ipsum<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;lorem&nbsp;ipsum<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorAttr"></a>
	<h3>method varsToSelectorAttr <span class="smalllinenumber">[line 1051]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorAttr(
String
$attr, String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields as attribute of nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorAttr">varsToSelectorAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&nbsp;rel=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&nbsp;rel=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorBefore"></a>
	<h3>method varsToSelectorBefore <span class="smalllinenumber">[line 963]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorBefore(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields before nodes matched by  selector. Method uses actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorBefore">varsToSelectorBefore</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;p&nbsp;class=&quot;field1&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;p&nbsp;class=&quot;field2&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorPrepend"></a>
	<h3>method varsToSelectorPrepend <span class="smalllinenumber">[line 789]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorPrepend(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields at the beggining of nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorPrepend">varsToSelectorPrepend</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>lorem&nbsp;ipsum&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorReplace"></a>
	<h3>method varsToSelectorReplace <span class="smalllinenumber">[line 615]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>QueryTemplatesPhpQuery|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorReplace(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields replacing nodes matched by  selector. Method uses actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToSelectorReplace">varsToSelectorReplace</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToStack()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStack"></a>
	<h3>method varsToStack <span class="smalllinenumber">[line 1179]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|QueryTemplatesPhpQuery varsToStack(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields inside actually matched  nodes. Second param needs to be wrapped with array_keys for non-assosiative  arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStack">varsToStack</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToSelector()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackAfter"></a>
	<h3>method varsToStackAfter <span class="smalllinenumber">[line 1523]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|QueryTemplatesPhpQuery varsToStackAfter(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields after actually matched  nodes. Second param needs to be wrapped with array_keys for  non-assosiative arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackAfter">varsToStackAfter</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node2&gt;&lt;/node2&gt;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToSelector()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackAppend"></a>
	<h3>method varsToStackAppend <span class="smalllinenumber">[line 1349]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|QueryTemplatesPhpQuery varsToStackAppend(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields at the end of actually  matched nodes. Second param needs to be wrapped with array_keys for  non-assosiative arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackAppend">varsToStackAppend</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToSelector()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackAttr"></a>
	<h3>method varsToStackAttr <span class="smalllinenumber">[line 1698]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|QueryTemplatesPhpQuery varsToStackAttr(
String
$attr, String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields as attribute of actually  matched nodes. Second param needs to be wrapped with array_keys for  non-assosiative arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackAttr">varsToStackAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&nbsp;rel=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;node1&nbsp;rel=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToSelector()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackBefore"></a>
	<h3>method varsToStackBefore <span class="smalllinenumber">[line 1610]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|QueryTemplatesPhpQuery varsToStackBefore(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields before actually matched  nodes. Second param needs to be wrapped with array_keys for  non-assosiative arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackBefore">varsToStackBefore</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToSelector()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackPrepend"></a>
	<h3>method varsToStackPrepend <span class="smalllinenumber">[line 1436]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|QueryTemplatesPhpQuery varsToStackPrepend(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields at the beggining of actually  matched nodes. Second param needs to be wrapped with array_keys for  non-assosiative arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackPrepend">varsToStackPrepend</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToSelector()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackReplace"></a>
	<h3>method varsToStackReplace <span class="smalllinenumber">[line 1262]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|QueryTemplatesPhpQuery varsToStackReplace(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields replacing actually matched  nodes. Second param needs to be wrapped with array_keys for non-assosiative  arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesSyntaxVars.html#methodvarsToStackReplace">varsToStackReplace</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node2&gt;&lt;/node2&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToSelector()</td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::varsToForm()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_valuesToSelector"></a>
	<h3>method _valuesToSelector <span class="smalllinenumber">[line 2315]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _valuesToSelector(

$target, 
$data, 
$selectorPattern, 
$skipFields, 
$fieldCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$data</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_varPrint"></a>
	<h3>method _varPrint <span class="smalllinenumber">[line 370]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _varPrint(

$target, 
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_varsParseFields"></a>
	<h3>method _varsParseFields <span class="smalllinenumber">[line 1731]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _varsParseFields(

$varFields)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_varsToLoop"></a>
	<h3>method _varsToLoop <span class="smalllinenumber">[line 2488]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _varsToLoop(

$pq, 
$varName, 
$asVarName, 
$keyName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$pq</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$asVarName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$keyName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_varsToSelector"></a>
	<h3>method _varsToSelector <span class="smalllinenumber">[line 1067]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>unknown_type _varsToSelector(
$target
$target, $varName
$varName, $varFields
$varFields, $selectorPattern
$selectorPattern, $skipFields
$skipFields, $fieldCallback
$fieldCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Internal method.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>TODO:</b>&nbsp;&nbsp;</td><td>support $varName to be a function (last char == ')'),</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$target&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$varName&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$varFields&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$selectorPattern&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$skipFields&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$fieldCallback&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_varsToStack"></a>
	<h3>method _varsToStack <span class="smalllinenumber">[line 1701]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _varsToStack(

$target, 
$varName, 
$varValue, 
$skipFields, 
$fieldCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varValue</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
</div><br />


        <div class="credit">
		    <hr />
		    Documentation generated on Sat, 07 Mar 2009 12:08:43 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.2</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>